#define _CRT_SECURE_NO_WARNINGS 1

#include "StackArray.h"
#include "QueueStack.h"

void test1() {
	Stack* pStack = InitStack();

	StackPush(pStack, 1);
	StackPrint(pStack);

	StackPush(pStack, 2);
	StackPush(pStack, 3);
	StackPrint(pStack);

	StackPop(pStack);
	StackPrint(pStack);

	StackPop(pStack);
	StackPrint(pStack);

	printf("top:%d\n", StackTop(pStack));

	StackPush(pStack, 1);
	StackPush(pStack,2);
	StackPush(pStack, 3);
	StackPush(pStack, 4);
	StackPush(pStack, 5);
	StackPush(pStack, 6);
	StackPush(pStack, 7);
	StackPush(pStack, 8);
	StackPrint(pStack);
}

void test2() {
	StackQueue* queue = StackQueueInit();

	StackEnQueue(queue,1);
	printf("%d\n", StackQueueFront(queue));

	StackEnQueue(queue, 2);
	StackEnQueue(queue, 3);
	StackEnQueue(queue, 4);
	printf("%d\n", StackQueueFront(queue));

	StackDeQueue(queue);
	printf("%d\n", StackQueueFront(queue));
	StackDeQueue(queue);
	printf("%d\n", StackQueueFront(queue));
	StackDeQueue(queue);
	printf("%d\n", StackQueueFront(queue));
}

int main() {
	//test1();
	test2();
}